from src.init.init_db import db
from src.utils.model import BaseModel


class PictureModel(BaseModel):
    __tablename__ = 'picture'  # 图片表

    pid = db.Column(db.BigInteger, primary_key=True)
    aid = db.Column(db.BigInteger, db.ForeignKey('article.aid'))  # 文章id
    purl = db.Column(db.String(80), nullable=False) # 文章中的图片
